<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>查询2</title>
</head>
<body>
<a th:href="@{./listAQ}">查询1</a>
<form th:action="@{./pageInfoByAQ}">
    <select name="districid">
        <option value="0">请选择</option>
        <option th:each="ds : ${districts}" th:value="${ds.id}" th:text="${ds.name}">-</option>
    </select>
    <button type="submit">根据区域查询</button>
</form>
<table>
    <tr>
        <td>序号</td>
        <td>区域</td>
        <td>监测时间</td>
        <td>PM10数据监测</td>
        <td>PM2.5数据</td>
        <td>监测站</td>
        <td>操作</td>
    </tr>

    <tr th:each="p : ${pageInfo.list}">
        <td name="id" th:text="${p.id}"></td>
        <td name="name" th:text="${p.district.name}"></td>
        <td name="monitortime" th:text="${#dates.format(p.monitortime,'yyyy MM-dd')}"></td>
        <td name="pm10" th:text="${p.pm10}"></td>
        <td name="pm25" th:text="${p.pm25}"></td>
        <td name="monitoringstation" th:text="${p.monitoringstation}"></td>
        <td><a onclick="aa()" th:href="@{./deleteAQ(id=${p.id})}">删除</a>/
            <a th:href="@{./selectByPrimaryKey(id=${p.id},districid=${p.districid})}">编辑</a></td>
    </tr>
</table>
当前第<span th:text="${pageInfo.pageNum}"></span>页，
共<span th:text="${pageInfo.pages}"></span> 页，
<span th:text="${pageInfo.total}"></span>条记录
<a th:href="@{./pageInfoByAQ(pageNum=1)}">首页</a>
<a th:href="@{./pageInfoByAQ(pageNum=${pageInfo.pageNum}-1)}">上一页</a>
<a th:href="@{./pageInfoByAQ(pageNum=${pageInfo.pageNum}+1)}">下一页</a>
<a th:href="@{./pageInfoByAQ(pageNum=${pageInfo.pages})}">尾页</a>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
    function aa(){
        if (confirm("是否删除？")){
            return true;
        }else{
            return false;
        }
    }
</script>
</html>